home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / Common / include / netvoice.h < prev   
Encoding:
C/C++ Source or Header  |  2001-10-31  |  1.9 KB  |  54 lines

  1. //-----------------------------------------------------------------------------
  2. // File: NetVoice.h
  3. //
  4. // Desc: 
  5. //
  6. // Copyright (C) 2000-2001 Microsoft Corporation. All Rights Reserved.
  7. //-----------------------------------------------------------------------------
  8. #ifndef NETVOICE_H
  9. #define NETVOICE_H
  10.  
  11.  
  12. #include <windows.h>
  13. #include <dvoice.h>
  14.  
  15.  
  16. class CNetVoice
  17. {
  18. public:
  19.     CNetVoice( LPDVMESSAGEHANDLER pfnDirectPlayClientVoiceMessageHandler,
  20.                LPDVMESSAGEHANDLER pfnDirectPlayServerVoiceMessageHandler );
  21.     virtual ~CNetVoice();
  22.  
  23.     HRESULT Init( HWND hDlg, BOOL bCreateSession, BOOL bConnectToSession, 
  24.                   LPUNKNOWN pDirectPlay, DWORD dwSessionType, GUID* pGuidCT, 
  25.                   DVCLIENTCONFIG* pdvClientConfig, LPDIRECTSOUND lpds = NULL );
  26.     HRESULT Free();
  27.  
  28.     HRESULT HostMigrate( LPDIRECTPLAYVOICESERVER pdvServerInterface );
  29.     HRESULT IsHalfDuplex() { return m_bHalfDuplex; }
  30.     HRESULT ChangeVoiceClientSettings( DVCLIENTCONFIG* pdvClientConfig );
  31.  
  32.     LPDIRECTPLAYVOICECLIENT GetVoiceClient() { return m_pVoiceClient; }
  33.     LPDIRECTPLAYVOICESERVER GetVoiceServer() { return m_pVoiceServer; }
  34.  
  35. protected:
  36.     LPDIRECTPLAYVOICECLIENT m_pVoiceClient;
  37.     LPDIRECTPLAYVOICESERVER m_pVoiceServer;                                                                             
  38.     LPDVMESSAGEHANDLER m_pfnDirectPlayClientVoiceMessageHandler;
  39.     LPDVMESSAGEHANDLER m_pfnDirectPlayServerVoiceMessageHandler;
  40.  
  41.     HRESULT VoiceSessionCreate( LPUNKNOWN pDirectPlay, DWORD dwSessionType, GUID* pGuidCT );
  42.     HRESULT VoiceSessionTestAudioSetup( HWND hDlg );
  43.     HRESULT VoiceSessionConnect( HWND hDlg, LPUNKNOWN pDirectPlay, 
  44.                                  DVCLIENTCONFIG* pdvClientConfig, LPDIRECTSOUND lpds = NULL );
  45.     HRESULT VoiceSessionDisconnect();
  46.     HRESULT VoiceSessionDestroy();
  47.  
  48.     HRESULT m_bHalfDuplex;
  49. };
  50.  
  51.  
  52. #endif // NETVOICE_H
  53.  
  54.